package com.xuelang.pipeline.infrastructure.application.converter;

import com.xuelang.pipeline.domain.application.Application;
import com.xuelang.pipeline.infrastructure.application.dataobject.ApplicationDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 应用实体与应用DO转换器类
 *
 * @author xiwen.zxg
 * @since 2024/5/15
 */
@Mapper
public interface ApplicationToApplicationDOConverter {

    ApplicationToApplicationDOConverter INSTANCE = Mappers.getMapper(ApplicationToApplicationDOConverter.class);

    /**
     * Application转化为ApplicationDO
     * @param application
     * @return
     */
    ApplicationDO applicationToApplicationDO(Application application);

    /**
     * ApplicationDO转化为Application
     * @param applicationDO
     * @return
     */
    Application applicationDOToApplication(ApplicationDO applicationDO);

}
